<?php
/**
 * Created by PhpStorm.
 * User: s.utkin
 * Date: 17.03.2015
 * Time: 19:03
 */

/**
 * @var $this \Action
 */
?>
<div class="form-group">
	<label class="col-sm-3 control-label"><?php echo $params['label'] ?></label>
	<div class="col-sm-9"
		 data-container="body"
		 data-errors='<?php echo json_encode($errors)?>'
		 data-trigger="manual" data-toggle="popover" data-placement="right"
		>
		<input type="text" <?php echo $htmlOptions ?>
			   data-errors='<?php echo json_encode($errors) ?>'
			   name="<?php echo $params['name'] ?>"
			<?php if (isset($params['newForm'])) { ?>
				query-new-form-url="<?php echo $this->url($params['newForm']['action'], (array)$params['newForm']['params']) ?>"
			<?php } ?>
			<?php if (isset($params['paramsForm'])) { ?>
				query-params-url="<?php echo $this->url($params['paramsForm']['action'], (array)$params['paramsForm']['params']) ?>"
			<?php } ?>
			<?php if (isset($params['typeahead'])) { ?>
				query-url="<?php echo $this->url($params['typeahead']['action'], (array)$params['typeahead']['params']) ?>"
			<?php } ?>
			   class="form-control tagsinput-many-with-params"
			   data-value="<?php echo $value ?>"/>

		<div class="element-notice description"><?php echo $params['description']; ?></div>
		<div class="element-notice error"><?php echo implode(', ', $errors); ?></div>
	</div>
</div>